package io.nutz.demo.processor;

import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.mvc.*;
import org.nutz.mvc.impl.processor.AbstractProcessor;

/*
 * 
 * @author zozoh(zozohtnt@gmail.com)
 * @author wendal(wendal1985@gmail.com)
 * 
 */
public class LogProcessor extends AbstractProcessor implements ActionFilter{

    private static final Log log = Logs.get();

    @Override
    public View match(ActionContext actionContext) {
        log.info("start LogProcessor match...");
        return null;
    }

    @Override
    public void init(NutConfig config, ActionInfo ai) throws Throwable {
        log.info("init...");
    }

    public void process(ActionContext ac) throws Throwable {
       log.info("start processing...");
        doNext(ac);
        log.info("finished process...");
    }

}
